home *** CD-ROM | disk | FTP | other *** search
- Path: news.iastate.edu!deaven
- From: deaven@ishmael.ameslab.gov (David Deaven)
- Newsgroups: comp.sys.cbm,comp.sys.atari.8bit
- Subject: Re: GNU C-compiler port to 6502
- Date: 4 Apr 1996 18:42:53 GMT
- Organization: Ames Laboratory, Ames, Iowa
- Message-ID: <4k157d$aj4@news.iastate.edu>
- References: <4irqpb$7pc@esel.cosy.sbg.ac.at> <4jgc70$lmt@dodo.cosy.sbg.ac.at> <4ji1te$dnk@agate.berkeley.edu> <4jobkn$6gh@dodo.cosy.sbg.ac.at>
- NNTP-Posting-Host: ishmael.ameslab.gov
-
- In article <4jobkn$6gh@dodo.cosy.sbg.ac.at>,
- Gerhard Wesp <gwesp@dodo.cosy.sbg.ac.at> wrote:
- > This is a tough example indeed. I don't know how to avoid such things
- >except by having a good optimizer brush up the assembly code _after_
- >the macro expansion has taken place. But, as you write, such an optimizer
- >would be quite a lot of hard work to write.
-
- This is called ``peephole optimization,'' and is provided by GCC.
- What you do is determine common sequences of bad or slow code that the
- compiler generates, and add a peephole optimizer to replace them
- with good fast code. In GCC, this facility is provided as you write
- the machine spec for a new processor.
-
- > Well, the manual says that gcc is a 32 bit compiler... Perhaps it would
- >really be better to try to make a ``true'' 6502 compiler (i.e. one which
- >knows everything about the internals of the processor)? However, the
- >ATARI cc65 results are a bit disappointing...
-
- GCC will work with quite a range of basic data type sizes. It is by
- no means fixed to 32-bit processors, at least for targets. The
- cross-compiler platform should be 32 bit, though (no big deal).
-
- --
- David Deaven deaven@ishmael.ameslab.gov
- A504 Physics tel 515-294-6878
- Ames Laboratory fax 515-294-0689
- Ames IA 50011 http://www.public.iastate.edu/~deaven
-